<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			window.onload = function(){
				console.log(history.length);
				
			}
			function goBack(){
				history.go(-1);
//				history.back();
			}
			function goAhead(){
				history.forward();
			}
		</script>
	</head>
	<body>
		我是2.html <br />
		<a href="javascript:;" onclick="goBack()">回退</a>
		<a href="javascript:;" onclick="goAhead()">下一个</a>
		<a href="3.html">跳转到3.html</a>
	</body>
</html>
